<template>
	<div>
		<NavTabs :tabs="navTagList" v-model="activeTag"></NavTabs>

		<div class="config-content" >
			<div class="report" :style="{width:nowRowData.approvalStatus ==1 || !nowRowData.approvalStatus?'100%':'65%'}">
				<ApplyReport v-if="activeTag == 2" v-bind="$attrs" :creditCode="creditCode" :isDetail="isDetail" :list="nowRowData.tableRel" :params="params"></ApplyReport>
				<MaterialForm v-else-if="activeTag == 3" v-bind="$attrs" :creditCode="creditCode" :isDetail="isDetail" :list="nowRowData.materialRel" :params="params"></MaterialForm>
				<ApplyReport v-else-if="activeTag == 4" v-bind="$attrs" :creditCode="creditCode" :isDetail="isDetail" :list="nowRowData.dataRel" :params="params"></ApplyReport>
				<ReceiptPage v-else-if="activeTag == 5" v-bind="$attrs" :creditCode="creditCode" :isDetail="isDetail" :nowRowData="nowRowData.receiptListJson"></ReceiptPage>
			</div>
			<slot></slot>
		</div>
	</div>
</template>

<script setup lang="ts">
import ApplyReport from '@/views/instOperate/components/ApplyReport/index.vue'
import MaterialForm from '@/views/instOperate/components/MaterialForm/index.vue'
import NavTabs from '@/views/instOperate/components/NavTabs/index.vue'
import ReceiptPage from './receipt/index.vue'

const props = withDefaults(
	defineProps<{
    creditCode?:string|number
		nowRowData: any
		navTagList: any
		params?: any
		isDetail?: boolean
	}>(),
	{
		navTagList: [
			{ label: '机构填报内容（申请表）', value: 2 },
			{ label: '机构填报内容（床位审核表）', value: 4 },
			{ label: '机构申请需要上传的材料', value: 3 },
		],
	}
)
console.log(props.nowRowData,'sdfsdfs')
const activeTag = ref(2)
</script>

<style scoped lang="scss">
.config-content {
	padding: 12px;
	margin-top: 20px;
	border: 1px solid #dcdcdc;
	border-radius: 10px;
	display: flex;
}
</style>
